package com.ghck.server.service;
import java.util.List;

import com.ghck.server.model.CreditsHistory;
import com.ghck.server.model.query.CreditsHistoryQuery;

/**
 * 积分历史  <br>
 * t_credits_history <br>
 * v1.0 2016-05-01
 */
 public interface CreditsHistoryService {
	
	/**
 	*根据ID删除 积分历史
 	*/
 	public Integer deleteCreditsHistoryById(Integer id);
 	
 	/**
 	*新增 积分历史
 	*/
 	public Integer batchInsertCreditsHistory(List<? extends CreditsHistory> creditsHistorys);
 	
 	/**
 	*新增 积分历史
 	*/
 	public Integer insertCreditsHistory(CreditsHistory domain);
 
 	
 	/**
 	*更新 积分历史
 	*/
 	public Integer updateCreditsHistory(CreditsHistory domain);
 	
 	/**
 	*根据ID查询 积分历史
 	*/
 	public CreditsHistory findCreditsHistoryById(Integer id);

	/**
 	*通过query 查询 积分历史
 	*/
	public List<CreditsHistory> findCreditsHistoryByQuery(CreditsHistoryQuery query);	
	
	/**
 	*通过query count总条数
 	*/
 	public Integer countCreditsHistoryByQuery(CreditsHistoryQuery query);
 	
 	/**
 	* 通过ids查询
 	*/
 	public List<CreditsHistory> findCreditsHistoryByIds(List<Integer> ids);
 	
 	/**
 	 * 签到
 	 * @param userId
 	 */
 	public Integer signIn(Integer userId);
 	
 	/**
 	 * 签到
 	 * @param userId
 	 */
 	public boolean todayIsSign(Integer userId);
 	
 	public Integer findMyCreditsAmount(Integer userId);
 	
}	